package br.com.atibrasil.fx.aplication;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.control.TabPane;
import javafx.scene.image.Image;
import javafx.stage.Modality;
import javafx.stage.Screen;
import javafx.stage.Stage;
 
public class GUIController extends Application {
    @FXML //  fx:id="menuTab"
    private TabPane menuTab;

    @FXML //  fx:id="grafico"
    private static LineChart<?, ?> grafico;
    
	@Override
	public void start(Stage stage) throws Exception {
		execute("");
	}
	
	public static void main(String[] args) {
		launch(null);
	}	
	
	public static void execute(String nomeSistema){
		Parent root;		
		try {
			root = FXMLLoader.load(GUIController.class.getResource("/br/com/atibrasil/fx/fxml/controllerForm.fxml"));	
		} catch (IOException e) {
			e.printStackTrace();
			return;
		}	
		Scene scene = new Scene(root);
		Stage stage = new Stage();			
		stage.setScene(scene);		
		stage.sizeToScene();	
		stage.centerOnScreen(); 
		stage.setHeight(Screen.getPrimary().getVisualBounds().getHeight()); 
		stage.setWidth(Screen.getPrimary().getVisualBounds().getWidth()); 
		stage.setTitle(GUISplash.NOME_EMPRESA);
//		Image img = new Image("/br/com/atibrasil/images/system.png");
//		stage.getIcons().add(img);
		stage.initModality(Modality.APPLICATION_MODAL);
		stage.show();				
	}
	
	public static void close(){
		
	}
}
